Skip to content

Conversation

@dianav18
Copy link

Summary

This PR adds GitHub Actions CI support for the Unikraft library package:
redis:7.0.

Each workflow includes:

run-local: Builds and runs the unikernel locally via QEMU
build: Matrix builds for QEMU and Firecracker (x86_64)
⚠️ push: Prepares OCI images for publishing (requires registry credentials)
🕒 schedule: Runs the workflow daily via cron

Test logic performs functional checks such as:

  • Compiling the unikernel with kraft build
  • Booting the unikernel locally with kraft run
  • Verifying that the instance starts successfully
  • Archiving OCI digests for registry upload

This setup improves test coverage and CI reliability by ensuring that:

  • redis:7.0 builds cleanly for both platforms
  • Local unikernel execution is validated
  • Future remote registry pushes are ready once secrets are set

Note

⚠️ The push step requires REG_USERNAME and REG_TOKEN secrets
to be configured in the repository in order to push OCI images to
index.unikraft.io.

Only local tests were verified during development.


Checklist

  • Read the contribution guidelines: https://unikraft.org/docs/contributing/unikraft
  • Test run-local (QEMU) for the redis:7.0 library
  • Validate push step with OCI secrets configured
  • Add Signed-off-by to commits (git commit -s)
  • Check for trailing whitespaces and ensure newline at EOF

Signed-off-by: Vulpoi Maria-Diana <[email protected]>
Comment on lines +89 to +118
run-remote:
name: Test redis:7.0 (Remote OCI)
needs: [build, push]
runs-on: ubuntu-latest
steps:
- name: Login to OCI registry
uses: docker/login-action@v3
with:
registry: index.unikraft.io
username: ${{ secrets.REG_USERNAME }}
password: ${{ secrets.REG_TOKEN }}

- name: Pull, run, validate and cleanup unikernel
run: |
set -euo pipefail
echo "Pull and start redis:7.0 unikernel"
IMAGE=index.unikraft.io/unikraft.org/redis:7.0
docker pull "$IMAGE"
CONTAINER_ID=$(docker run --rm -d "$IMAGE")
echo "Wait and validate container startup"
sleep 5
if ! docker ps --filter "id=$CONTAINER_ID" --format '{{.ID}}' | grep -q .; then
echo "ERROR: redis:7.0 unikernel is not running" >&2
docker logs "$CONTAINER_ID" >&2 || true
docker stop "$CONTAINER_ID" || true
exit 1
fi
echo "redis:7.0 unikernel started successfully"
echo "Cleanup container"
docker stop "$CONTAINER_ID" || true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the run-remote job from all PRs

Comment on lines +128 to +132
- name: Install kraft CLI
run: |
echo "deb [trusted=yes] https://deb.pkg.kraftkit.sh/ /" | sudo tee /etc/apt/sources.list.d/kraftkit.list
sudo apt-get update
sudo apt-get install -y kraftkit
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use the kraftkit github action so there is no need to install, like we discussed

https://github.com/marketplace/actions/build-unikernel-images-with-unikraft#use-in-github-actions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants